Update oXs_out_frsky.cpp
[openXsensor.git] / oXs_Configurator / Python 37 Sources / oxsAirspeed.py
blob2ca8ccd32d41566d8488bbbda8d3e748edf976d6
1 from oxsConfig import ttk , W , E , Spinbox , fAirspeed , airspeedTypeVar , airspeedAtSea15CVar , airspeedInKmhVar , \
2 airspeedResetAtPpmVar , airspeedCompMinAtPpmVar , airspeedCompMaxAtPpmVar , airspeedCompMinVar , airspeedCompMaxVar
4 #define AIRSPEED_SENSOR_USE NO_AIRSPEED // select between NO_AIRSPEED , MS4525 , MPXV7002
6 #define AIRSPEED_AT_SEA_LEVEL_AND_15C // if this line is commented, airspeed is calculated using baro pressure and temperature (so being "true" airspeed instead of normalised airspeed)
7 #define AIRSPEED_IN_KMH // uncomment this line if airspeed has to be in km/h instead of knot/h ( except some old versions, openTx expects knot/h)
9 #define AIRSPEED_RESET_AT_PPM 100
11 #define COMPENSATION_MIN_AT_PPM 60
12 #define COMPENSATION_MAX_AT_PPM 90
13 #define COMPENSATION_PPM_MIN 80
14 #define COMPENSATION_PPM_MAX 140
16 ttk.Label(fAirspeed, text="Type of sensor").grid(row=1, sticky=E , pady=(20,2))
17 airspeedTypeBox = ttk.Combobox(fAirspeed, textvariable=airspeedTypeVar,
18 values=( "MS4525" , "MPXV7002" ),
19 state="readonly")
20 airspeedTypeBox.grid(column=1 , sticky=W , row=1, padx=5)
21 ttk.Checkbutton(fAirspeed, text='Airspeed at sea level and 15 degree Celsius', variable=airspeedAtSea15CVar,
22 onvalue='On', offvalue='Off').grid(row=2, sticky=(W), padx=10 , pady=(20,2))
23 ttk.Checkbutton(fAirspeed, text='Airspeed in km/h (otherwise in knot/h as expected by openTx)', variable=airspeedInKmhVar,
24 onvalue='On', offvalue='Off').grid(row=3, sticky=(W,E), padx=10 , pady=(20,2))
26 ttk.Label(fAirspeed, text="Reset airspeed when ppm is (%)").grid(row=4, sticky=(E), pady=(20,2))
27 airspeedResetAtPpmBox = Spinbox(fAirspeed , from_=0, to=100, width = 5 , textvariable=airspeedResetAtPpmVar )
28 airspeedResetAtPpmBox.grid(column=1, row=4 , sticky=W, padx=5, pady=(20,2))
30 ttk.Label(fAirspeed, text="Min Compensation when ppm is (%)").grid(row=5, sticky=(E), pady=(20,2))
31 airspeedCompMinAtPpmBox = Spinbox(fAirspeed , from_=0, to=100, width = 5 , textvariable=airspeedCompMinAtPpmVar )
32 airspeedCompMinAtPpmBox.grid(column=1, row=5 , sticky=W, padx=5, pady=(20,2))
34 ttk.Label(fAirspeed, text="Max Compensation when ppm is (%)").grid(row=6, sticky=(E), pady=(20,2))
35 airspeedCompMaxAtPpmBox = Spinbox(fAirspeed , from_=0, to=100, width = 5 , textvariable=airspeedCompMaxAtPpmVar )
36 airspeedCompMaxAtPpmBox.grid(column=1, row=6 , sticky=W, padx=5, pady=(20,2))
38 ttk.Label(fAirspeed, text="Min Compensation is (%)").grid(row=7, sticky=(E), pady=(20,2))
39 airspeedCompMinBox = Spinbox(fAirspeed , from_=50, to=100, width = 5 , textvariable=airspeedCompMinVar )
40 airspeedCompMinBox.grid(column=1, row=7 , sticky=W, padx=5, pady=(20,2))
42 ttk.Label(fAirspeed, text="Max Compensation is (%)").grid(row=8, sticky=(E), pady=(20,2))
43 airspeedCompMaxBox = Spinbox(fAirspeed , from_=100, to=200, width = 5 , textvariable=airspeedCompMaxVar )
44 airspeedCompMaxBox.grid(column=1, row=8 , sticky=W, padx=5, pady=(20,2))